home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / batchut / ifits31.zip / IFITS.DOC next >
Text File  |  1991-11-09  |  19KB  |  369 lines

  1.         -----------------------------------------------------------------
  2.         IFITS.EXE                                      Batch file utility
  3.         Conditional execution batch file utility, with virus checking.
  4.         Part of the SETHware Grabbag, published by sThomas.
  5.  
  6.         -----------------------------------------------------------------
  7.         WHAT IFITS DOES
  8.  
  9.         IFITS started out as an extremely flexible way to run hard disk
  10.         backups from the AUTOEXEC.BAT file.  Along the way, it's grown.
  11.         An IFITS command typically looks like this:
  12.  
  13.         >>>    ifits 9am do lotus
  14.  
  15.         This command would call up LOTUS.COM if the system clock reads
  16.         somewhere between 9:00 A.M. and 9:59 A.M.  Otherwise, it would
  17.         simply exit.
  18.  
  19.         You can stack conditions.  For instance, you could use this
  20.         statement:
  21.  
  22.         >>>    ifits THU FRI 12/25 EOM do simcity
  23.  
  24.         In this case, if it's Thursday, OR it's Friday, OR it's Christmas,
  25.         OR it's the last day of the month, you'd play SIMCITY - otherwise,
  26.         you wouldn't.  Let's look at a file name.
  27.  
  28.         >>>    ifits FRI file d:\store\accounts.dta do checking
  29.  
  30.         In this case, if the accounts.dta file was last updated on a
  31.         Friday, ifits will execute the checking program (or perhaps,
  32.         given the name, it's a batch file called CHECKING.BAT).
  33.  
  34.         >>>    ifits today file appoint.doc do backup
  35.  
  36.         In this case, you want to do a backup if your appoint.doc file
  37.         was updated today.  (You might put this one in a batch file you
  38.         call last thing before you leave the office.)
  39.  
  40.         Here are the basic rules:
  41.            >   If there's a FILE keyword, the next word on the command
  42.                line should be the filename.
  43.            >   All the 'conditions' on the command line need to be LEFT
  44.                of the DO keyword.  (Otherwise, IFITS thinks it's part
  45.                of the command to be executed.)
  46.            >   Normally, if ANY condition is true, the command is executed.
  47.            >   If you use the NOT keyword, the command is ignored if ANY
  48.                condition is true.  (It executes only if ALL conditions are
  49.                false.  IFITS NOT THU FRI DO SOMETHING will never execute
  50.                SOMETHING.)
  51.            >   You can "stack" IFITS. (IFITS fri DO IFITS NOT 12am DO 123
  52.                will execute 123 if it's Friday and not between midnight
  53.                and 12:59 A.M.)
  54.            >   IFITS uses a secondary command processor which overlays
  55.                IFITS in memory.  That means that the ONLY memory IFITs
  56.                takes away from you application is an extra copy of the
  57.                environment.  (You can adjust that using the SHELL
  58.                statement in your CONFIG.SYS file - see your DOS manual).
  59.                It also means that if you run a batch file as the
  60.                command, any SET statements do NOT affect the master
  61.                environment; you need to use DEEPSET, available on the
  62.                SETHware Grabbag utility disk.
  63.  
  64.         Here are the ifits vocabulary:
  65.  
  66.                    1    through 31       checks Day of month
  67.                    1/1  through 12/31    checks Day of year
  68.                    EOM                   checks End (last day) Of Month
  69.                    12am through 11pm     checks Hour part of time
  70.                    TODAY                 checks using today's date
  71.                                             (always true if no file)
  72.                    JAN  through DEC      checks Month of Year
  73.                    AM                    checks for before noon
  74.                    PM                    checks for after noon
  75.                    ASCII                 named file is ASCII text file
  76.                                             (never true if no file)
  77.                    NOT                   all conditions must be untrue
  78.                    FILE                  check against file datestamp
  79.                                             instead of against system
  80.                                             date/time
  81.                    DO                    everything that follows is
  82.                                             the command to be executed.
  83.  
  84.         -----------------------------------------------------------------
  85.         VIRUS CHECKING!
  86.  
  87.         IFITS tends to be used in the AUTOEXEC.BAT file.  Programs that
  88.         get executed a lot tend to be very susceptible to virii.  As an
  89.         added feature, IFITS inspects itself to check for viral infection.
  90.         If it detects a change, it will report to you.  While this does
  91.         not take the place of a virus-scanning program, it will serve to
  92.         give you early warning of many viruses.
  93.  
  94.         If you're not going to use IFITS for any other reason, put the
  95.         line IFITS NOT TODAY DO DIR in your AUTOEXEC.BAT.  Obviously, it
  96.         is never "not today," and you'll never see a DIR, but you'll get
  97.         the virus-checking anyway.
  98.  
  99.         -----------------------------------------------------------------
  100.         IFITS and MKMTFILE
  101.  
  102.         MKMTFILE is a program that creates files of zero length.  For
  103.         most people, a file of just 1 byte requires 4096 bytes of room
  104.         on the hard disk.  A zero-length file, however, requires no
  105.         disk space at all - it just takes up another filename slot in
  106.         your directory.
  107.  
  108.         MKMTFILE ("Make empty file") works nicely with IFITS, because
  109.         you can use empty files in your batch files to flag whether
  110.         something has happened or not happened.  DOS gives you their
  111.         "if exists" command that works nicely with MKMTFILE, but IFITS
  112.         lets you examine the date or time the empty file was created.
  113.  
  114.         Of course, if you're creating empty files, you may need to
  115.         erase those files.  DELMTFIL searches out and erases all
  116.         files of zero length, to keep your directories clean and easy
  117.         to read.  Both MKMTFILE and DELMTFIL are part of the SETHware
  118.         Grabbag.
  119.         -----------------------------------------------------------------
  120.         WHAT IS SHAREWARE?
  121.  
  122.         IFITS is part of the SETHware Grabbag, a shareware package of
  123.         utilities from sThomas.  Shareware isn't a different type of
  124.         software; it's a marketing technique with two big differences.
  125.  
  126.         The first is the shareware guarantee.  We're so sure you'll love
  127.         our products, we let you try them before you buy them.
  128.  
  129.         The second is the value difference.  Ever notice that a $500
  130.         program only costs $100 for existing users to buy from the
  131.         publisher?  That's because retail and wholesale eats up 80% of
  132.         the purchase price!  Because we sell directly to the user at
  133.         wholesale prices, we can give you a more valuable program at a
  134.         fraction of the expense.
  135.  
  136.         Please try out IFITS for a month or two.  If you find that IFITS
  137.         is useful and handy, we ask you to do two things.
  138.                1.  Pass copies along to your friends, relatives,
  139.                    neighbors and co-workers, so they can try it, too.
  140.                    Tell them what you like about IFITS (and what you
  141.                    dislike, too - we're happy to stand or fall on our
  142.                    merits.)
  143.                2.  Buy a license for IFITS.  .  You see, that way, we
  144.                    get stuck with a BIG income tax bill, and we just
  145.                    love to send money to the IRS.
  146.  
  147.         Please ensure that the copies of IFITS or of the SETHware Grabbag
  148.         that you pass along are complete with all related files.
  149.  
  150.         -----------------------------------------------------------------
  151.         LICENSING
  152.  
  153.         IFITS is part of the SETHware Grabbag.  You can license the
  154.         complete SETHware Grabbag or license any individual SETHware
  155.         Grabbag program by itself.
  156.  
  157.         We have 'single' licenses, 'WAN/LAN' licenses, and site licenses.
  158.  
  159.         Single licenses follow the Borland '